package com.moyu.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.moyu.admin.entity.SysPermission;
import com.moyu.admin.entity.SysRole;
import com.moyu.admin.mapper.SysPermissionMapper;
import com.moyu.admin.service.SysPermissionService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author moyu
 * @since 2019-02-18
 */
@Service
@Transactional
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> implements SysPermissionService {

  @Autowired
  private SysPermissionMapper sysPermissionMapper;

  @Override
  public List<SysPermission> findPermissionsByRoles(List<SysRole> roles) {
    return sysPermissionMapper.findPermissionByRoles(roles);
  }
}
